package top.yxqz.number2.service.imp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.yxqz.number2.dao.DogDao;
import top.yxqz.number2.entity.Dog;
import top.yxqz.number2.service.DogService;

/**
 * @author: 余小小
 * @date: 2023/9/12
 * @description：
 */
@Service
public class DogServiceImp implements DogService {

    @Autowired
    private DogDao dogDao;


    /**
     * 实现 获取小狗的信息的方法
     *
     * @return
     */
    @Override
    public Dog getDogObj() {
        Dog dogObj = dogDao.getDogObj();
        if (dogObj.getName().equals("小狗")) {
            dogObj.setName("高级小狗");
        }
        return dogObj;
    }
}
